package com.cloudkinto.common.error;

public enum ErrorEnum implements BaseErrorInfoInterface {
    // 数据操作错误定义
    SUCCESS("200", "success"),
    FAILURE("500", "operate.failure"),
    INTERNAL_SERVER_ERROR("500", "server.internal.error"),
    BODY_NOT_MATCH("400", "dataformat.not.match"),
    SIGNATURE_NOT_MATCH("401", "signature.not.match"),
    NOT_FOUND("404", "resource.not.found"),
    SERVER_BUSY("503", "server.is.busy"),
    NOT_SUFFICIENT_FUNDS("800", "account.balance.insufficient"),
    USER_SESSION_ERROR("900", "user.session.not.exist");

    /**
     * 错误码
     */
    private String resultCode;

    /**
     * 错误描述
     */
    private String resultMsg;

    ErrorEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
